import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;


public class RGPlacemark extends Placemark {

	public RGPlacemark() {
		this.name = "rg";
		this.colorMap = (new Color[128]);
		float n=this.getColorMap().length;
		for (float i=0;i<n;i++)
		{
			float r,g,b;
			float x=i/n;
			if (x<.5) 
			{
				r=2.0f*x;
				g=0.5f+x;
				b=0.25f;
			}
			else 
			{
				r=1.0f;
				g=2.0f*(1.0f-x);
				b=0.5f*(1.0f-x);
			}
			this.colorMap[(int)i]=new Color(r,g,b);
		}
	}
	
	void paintImage(Graphics g, Color color)
	{
		Graphics2D g2d = (Graphics2D) g;
		g2d.setColor(color); 
		g2d.fillOval(8, 8, 8, 8);
		g2d.setColor(Color.black);
		g2d.drawOval(8,8,8,8);
	}
}